#!/bin/bash



CFG_DIR=`cat .WKDIR`

#CFG_DIR=params_1MHz_mosaic_blue$1
CFG_DIR=params_900K_mosaic_blue$1
#CFG_DIR=params_512K_mosaic_blue$1
#CFG_DIR=params_2000K_mosaic_blue$1
#CFG_DIR=params_250K_mosaic_blue$1
#CFG_DIR=params_500K_mosaic_blue$1

# CCD drive parameters
echo "configure CCD driver parameters"
bin/ccd290_drive_config ${CFG_DIR}/ccd_drv.ini
sleep 1

# DCDC weights
echo "configure DCDS weights"
bin/dcds_w_cfg ${CFG_DIR}/dcds_weights_cfg.ini
sleep 1

# 临时关闭将DSP处理后的数据写入DDR
bin/ddr_wr_en 1

#bin/cfg_idelay params_1MHz_mosaic/idelay_cfg.ini
 
# 配置当前FPGA为master


#if [ $# -eq 0 ]
#then
#    echo 'PL run in slave mode'
#    ./PL_isMaster 0
#elif [ $# -eq 1 ]
#then
 #    echo 'PL run in master mode'
#    ./PL_isMaster 1
#fi
